path_assign

Duplicates an existing path.

语法:

path_assign(index, path);


参数 描述
index The index of the path to be overwritten.
path The index of the path that will overwrite 'index'.


返回: N/A(无返回值)


描述

With this function you can copy the path data from one path to another. The path being copied to will be cleared first (should it have any path points) and be completely overwritten by the path being copied from. Neither path is deleted in the process and the result is two paths, with two different indexes, but the exact same form and points.


例如:

mypath = path_add();
path_assign(mypath, choose(path_1, path_2, path_3));

The above code will create a new, empty path indexed in the variable "mypath" and then copy over the path data from one of the three available path resources.


上一页: Changing Paths
下一页: path_delete
© Copyright YoYo Games Ltd. 2018 All Rights Reserved